package pro.lepers.portfolio.view.contents.portfolio.data.contents {
	import fr.digitas.flowearth.core.IIterator;
	import fr.digitas.flowearth.core.VIterator;

	import pro.lepers.portfolio.view.contents.portfolio.content.ImageContent;
	import pro.lepers.portfolio.view.contents.portfolio.content.ThumbContent;

	/**
	 * @author Pierre Lepers
	 */
	public class ImagesContentData extends AbstractContentData {
		
		public function ImagesContentData() {
		
		}

		override public function getView() : ThumbContent {
			return new ImageContent( this );
		}
		
		public function getImagesUrl() : IIterator {
			return new VIterator( Vector.<Object>(_imagesUrl) );
		}

		
		
		override internal function _parse(datas : XML) : void {
			super._parse( datas );
			
			var imgList : XMLList = datas.url;
			_imagesUrl = new Vector.<String>( imgList.length(), true );
			
			for (var i : int = 0; i < _imagesUrl.length; i++) 
				_imagesUrl[ i ] = imgList[ i ].text();
			
		}
		
		
		
		private var _imagesUrl : Vector.<String>;
	}
}
